home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 2.iso / dist / fw_gnome-libs.idb / usr / freeware / share / idl / name-service.idl.z / name-service.idl
Text File  |  2002-07-08  |  2KB  |  74 lines

  1. /* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
  2. #pragma prefix "omg.org"
  3.  
  4. module CosNaming {
  5.     typedef string Istring;
  6.     struct NameComponent {
  7.         Istring id;
  8.         Istring kind;
  9.     };
  10.  
  11.     typedef sequence<NameComponent> Name;
  12.  
  13.     enum BindingType {
  14.         nobject,
  15.         ncontext
  16.     };
  17.  
  18.     struct Binding {
  19.         Name binding_name;
  20.         BindingType binding_type;
  21.     };
  22.  
  23.     typedef sequence<Binding> BindingList;
  24.  
  25.     interface BindingIterator;
  26.  
  27.     interface NamingContext {
  28.         enum NotFoundReason {
  29.             missing_node,
  30.             not_context,
  31.             not_object
  32.         };
  33.  
  34.         exception NotFound {
  35.             NotFoundReason why;
  36.             Name rest_of_name;
  37.         };
  38.  
  39.         exception CannotProceed {
  40.             NamingContext ctx;
  41.             Name rest_of_name;
  42.         };
  43.  
  44.         exception InvalidName{};
  45.         exception AlreadyBound{};
  46.         exception NotEmpty{};
  47.  
  48.         void bind(in Name n, in Object obj)
  49.             raises(NotFound, CannotProceed, InvalidName, AlreadyBound);
  50.         void rebind(in Name n, in Object obj)
  51.             raises(NotFound, CannotProceed, InvalidName);
  52.         void bind_context(in Name n, in NamingContext nc)
  53.             raises(NotFound, CannotProceed, InvalidName, AlreadyBound);
  54.         void rebind_context(in Name n, in NamingContext nc)
  55.             raises(NotFound, CannotProceed, InvalidName);
  56.         Object resolve(in Name n)
  57.             raises(NotFound, CannotProceed, InvalidName);
  58.         void unbind(in Name n)
  59.             raises(NotFound, CannotProceed, InvalidName);
  60.         NamingContext new_context();
  61.         NamingContext bind_new_context(in Name n)
  62.             raises(NotFound, AlreadyBound, CannotProceed, InvalidName);
  63.         void destroy()
  64.             raises(NotEmpty);
  65.         void list(in unsigned long how_many, out BindingList bl, out BindingIterator bi);
  66.     };
  67.  
  68.     interface BindingIterator {
  69.         boolean next_one(out Binding b);
  70.         boolean next_n(in unsigned long how_many, out BindingList bl);
  71.         void destroy();
  72.     };
  73. };
  74.